import { defineStore } from 'pinia'
import { storage } from '@/utils/storage';
export const useMainStore = defineStore('main', {
  // state 定义响应式状态
  state: () => {
    return {
      counter: 0
    }
  },
  // getters 计算属性
  getters: {
    doubleCount(state) {
      return state.counter * 2
    }
  },
  // actions 定义方法修改状态
  actions: {
    increment() {
      this.counter++ 
    }
  }
})